;(() => {
  const numberArr: Array<number> = [1, 2, 3]
  const stringArr: string[] = ['1', '2', '3']

  const undefinedArr: undefined[] = [undefined, undefined]
  const arr: (number | string)[] = [1, 'ssss', 2]

  // 类型
  type Person = { name: string; age: number }

  // 接口
  interface Person1 {
    name: string
    age: number
  }

  // 类
  class Person2 {
    name: string
    age: number
    constructor(name: string, age: number) {
      this.name = name
      this.age = age
    }
  }

  const persons: Person1[] = [
    { name: '胭脂', age: 18 },
    { name: '小明', age: 99 },
  ]
})()
